package com.leoman.systemsetting.dao;

import com.leoman.common.dao.IBaseJpaRepository;
import com.leoman.systemsetting.entity.HotWords;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

/**
 * 热词dao
 * Created by 涂奕恒 on 2016/8/2 0002.
 */
public interface HotWordsDao extends IBaseJpaRepository<HotWords> {

    @Query("select a from HotWords a where a.content = ?1")
    HotWords findOneByContent(String content);

    @Query("select a from HotWords a order by a.count desc")
    Page<HotWords> iPage(Pageable pageable);
}
